// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const { ADS } = require("../ads/ADS");

cc.Class({
    extends: cc.Component,

    properties: {
        oneMonthBtn: cc.Button,
        threeMonthBtn: cc.Button,
        sixMonthBtn: cc.Button,
        shopName: cc.Label,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        cc.debug.setDisplayStats(false)

        this.shopName.string =  cc.sys.localStorage.getItem('shopName')||shopName;
    },

    start () {
        // ADS.initAds();
    },
    selectMode(target, i) {
        //进入游戏 
        window.mode = i;
        cc.sys.localStorage.setItem('mode', i);
        cc.director.loadScene('home');

    },
    enterRank(target, i){
        cc.director.loadScene('rank');
    }
   
    // update (dt) {},
});
